package com.xxmw.transaction.service.app.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import com.xxmw.transaction.model.app.Hedging;
import com.xxmw.transaction.service.app.BrickOrderService;

/**
 * 币种聚合监听器
 * @author xiangzuotao
 * @2020年5月25日
 */
@Component
public class SymbolAggregationListner {
	
	@Autowired
	private BrickOrderService brickOrderService;
	
	@EventListener(value = SymbolAggregationEvent.class)
	public void aggregation(SymbolAggregationEvent event) {
		Hedging hedging = event.getHedging();
		// 搬砖
		brickOrderService.preOrder(hedging);
	}

}
